home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 138
/
Volume 138 Aug 19 2011 - Damaged.iso
/
Games
/
shadez.swf
/
scripts
/
Local
/
Draw
/
CScreen_SelectLevel.as
< prev
next >
Wrap
Text File
|
2011-08-19
|
5KB
|
143 lines
package Local.Draw
{
import Local.External.CURL;
import Local.Game.Level.CLevelData;
import flash.display.MovieClip;
import flash.events.Event;
import flash.events.MouseEvent;
public class CScreen_SelectLevel extends CScreen
{
public var mcButtonLevelIcon1:MovieClip;
public var mcButtonLevelIcon3:MovieClip;
public var mcButtonLevelIcon4:MovieClip;
public var mcButtonLevelIcon2:MovieClip;
public var mcBackground:MovieClip;
public var mcLogo:MovieClip;
public var mcButtonBack:MovieClip;
public var mcMoreGames:MovieClip;
public var mcButtonStartWar:MovieClip;
public var mcSize:MovieClip;
public function CScreen_SelectLevel()
{
var _loc1_:int = 0;
if(true)
{
super();
if(true)
{
AddButton("startwar",new CScreenButton(mcButtonStartWar,Button_Default)).addEventListener(CScreenButton.MOUSECLICK,e_STARTLEVEL);
if(true)
{
AddButton("level0",new CScreenButton(mcButtonLevelIcon1,Level_Icon_Vis)).addEventListener(CScreenButton.MOUSECLICK,e_SELECTLEVEL);
if(true)
{
AddButton("level1",new CScreenButton(mcButtonLevelIcon2,Level_Icon_Vis)).addEventListener(CScreenButton.MOUSECLICK,e_SELECTLEVEL);
}
AddButton("level2",new CScreenButton(mcButtonLevelIcon3,Level_Icon_Vis)).addEventListener(CScreenButton.MOUSECLICK,e_SELECTLEVEL);
}
AddButton("level3",new CScreenButton(mcButtonLevelIcon4,Level_Icon_Vis)).addEventListener(CScreenButton.MOUSECLICK,e_SELECTLEVEL);
}
_loc1_ = 0;
}
while(_loc1_ < 4)
{
SelectLevel(_loc1_);
DeselectLevel(_loc1_);
_loc1_++;
}
AddLogoButton();
AddBackButton("main");
AddMoreGamesButton("SelectLevel");
SelectLevel(0);
}
private function e_SELECTLEVEL(param1:Event = null) : void
{
var _loc2_:CScreenButton = null;
_loc2_ = CScreenButton(param1.currentTarget);
SelectLevel(Number(_loc2_.mID.substr(_loc2_.mID.length - 1)));
}
private function e_VIEWSCORES(param1:MouseEvent = null) : void
{
CURL.ViewHiscore(CLevelData.mGameID);
}
private function e_STARTLEVEL(param1:Event = null) : void
{
var _loc2_:CScreenButton = null;
_loc2_ = CScreenButton(param1.currentTarget);
CLevelData.mMochiBotTrack();
mParent.GetScreen("loadinglevel").Activate();
}
private function DeselectLevel(param1:int) : void
{
var _loc2_:MovieClip = null;
_loc2_ = mButtons["level" + param1].mcButton;
_loc2_.bViewScores.visible = false;
_loc2_.mcSelected.visible = false;
_loc2_.mcSelected.enabled = false;
mButtons["level" + param1].mEnabled = true;
}
private function SelectLevel(param1:int) : void
{
var _loc2_:int = 0;
var _loc3_:MovieClip = null;
if(true)
{
_loc2_ = 0;
}
for(; _loc2_ < 4; _loc2_++)
{
if(_loc2_ != param1)
{
if(false)
{
_loc3_ = mButtons["level" + param1].mcButton;
if(true)
{
_loc3_.tbName.text = CLevelData.mName + " (" + CLevelData.mDifficulty + ")";
if(true)
{
_loc3_.mcGraphic.gotoAndStop(1 + param1);
if(true)
{
_loc3_.bViewScores.visible = true;
_loc3_.bViewScores.addEventListener(MouseEvent.MOUSE_DOWN,e_VIEWSCORES);
}
_loc3_.mcSelected.visible = true;
}
mButtons["level" + param1].mEnabled = false;
}
return;
}
DeselectLevel(_loc2_);
if(false)
{
break;
}
continue;
addr37:
}
}
CLevelData.mLevelIndex = param1;
§§goto(addr37);
}
}
}